package com.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blog.dto.UserInfoDTO;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("notification")
public class Notification {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long userId;        // 接收通知的用户ID
    @TableField(exist = false)
    private UserInfoDTO fromUser; //谁干的
    private Long initiatorId;   // 触发通知的用户ID
    private String type;        // 通知类型：ARTICLE_COMMENT, COMMENT_REPLY, ARTICLE_LIKE等
    private String content;     // 通知内容
    private Long articleId;     // 相关文章ID
    private Long commentId;     // 相关评论ID
    private Integer status;     // 状态：0-未读，1-已读
    private LocalDateTime createTime;  // 创建时间
}
